package fauxman.DynamicElements;

import java.awt.Point;

import fauxman.BlinkyStates.ChaseBlinkyState;
import fauxman.BlinkyStates.EnteringHouseBlinkyState;
import fauxman.BlinkyStates.ScatterBlinkyState;
import fauxman.model.WorldModel;
import fauxman.states.GhostState;
import fauxman.utilities.ActionUtil;
import fauxman.utilities.SpriteUtil;

public class BlinkyGhost extends Ghost{
	public BlinkyGhost(int conX, int conY, int disX, int disY, int width,
			int height, WorldModel model) {
		super(conX, conY, disX, disY, width, height, model);
		states.add(model.getGhostsCurrentState(this));
		states.getFirst().setAppearance(0, this);
		setCurrentDirection(ActionUtil.WEST);
		setNextDirection(getCurrentDirection());
		this.lookAhead = new Point(disX - 1, disY); //TODO: maybe change behavior to future ghost vs. lookahead
	}

	public String toString(){
		return "BG";
	}
	
	public GhostState getScatterState() {
		return ScatterBlinkyState.getInstance();
	}
	
	public GhostState getChaseState() {
		return ChaseBlinkyState.getInstance();
	}
	
	@Override
	public GhostState getEnteringGhostHouseState() {
		return EnteringHouseBlinkyState.getInstance();
	}

	@Override
	public void setNormalAppearance(int appearanceID) {
		setAppearance(SpriteUtil.getBlinkySprite(appearanceID));
	}
}
